1. Field of the Invention
The present invention relates to a data processing method employed when messages are exchanged between a client object and a plurality of server objects. The invention also relates to a recording medium on which an operating system implementing the above data processing method is recorded, and to a data processing apparatus provided with the above recording medium.
2. Description of the Related Art
Hitherto, software, such as application programs, is usually described by using a function call. The basic operation of the function call is shown in FIG. 1. In FIG. 1, the function calling side is shown as a client, while the function-call receiving side is shown as a server.
In the function call, the client calls the function of the server, as indicated by the arrow A1 in FIG. 1, thereby causing the server to execute the function, as indicated by the solid line A2 in FIG. 1. During this function calling, the client is in the waiting state, as represented by the single-dot-chain line A3 in FIG. 1. Upon completing the processing executed by the server, the server returns the value to the client, as indicated by the arrow A4 in FIG. 1, thereby causing the client to restart processing, as indicated by the solid line A5 in FIG. 1.
Along with recent advances in software programming techniques, the development of software based on the object-oriented technique is progressing. When the object-oriented technique is applied to software, the functions of the software, such as application programs, can be formed into modules by forming objects. By exchanging the required information with each other such as messages, the objects fulfill their functions as modules. Such message exchanges are referred to as xe2x80x9cmessage passingxe2x80x9d.
As a method for implementing message passing, various techniques have been proposed and have been put into practical use. One of the techniques is xe2x80x9cfuturexe2x80x9d-based message passing. The basic operation of future-based message passing is shown in FIG. 2.
In future-based message passing, a message is sent from a client object to a server object, as represented by the arrow B1 in FIG. 2, to request the server object to perform predetermined processing. At this time, a data area for storing the result of the processing executed by the server object is reserved. The data area is an area for storing the result to be received by the client object, and is referred to as a xe2x80x9cfuturexe2x80x9d.
The server object executes processing, as indicated by the solid line B2 in FIG. 2, in accordance with the request of the message sent from the client object. When the processing is completed, the server object stores the processing result in the future, as represented by the arrow B3 in FIG. 2.
Meanwhile, the client object continues processing, as indicated by the solid line B4 in FIG. 2, after sending the above message to the server object. Thereafter, when the client object requires the result of the processing performed by the server object, it reads the data stored in the future, as represented by the arrow B5 in FIG. 2.
At this time, if the result of the processing executed by the server object has not yet been stored in the future, the client object is in the waiting state, as represented by the single-dot-chain line B6 in FIG. 2. When the processing result sent from the server object is stored in the future, it is delivered to the client object from the future, as represented by the arrow B7 in FIG. 2.
That is, if the result of the processing executed by the server object is stored in the future, the client object immediately receives the processing result. If, however, the result of the processing performed by the server object has not yet been stored in the future, the client object remains in the waiting state until the result is stored in the future.
In the development of object-oriented software, the functions of the software, such as application programs, are formed into modules by forming objects, as noted above. In this case, software, such as an application program, may be implemented by a single object. Alternatively, each function of the application program may be further formed into a module, so that the application program can be implemented by a plurality of objects.
In performing the above-described message passing, if the server object is implemented by a single object, it executes the processing requested by the client object by using the single object in response to the message sent from the client object, and then delivers the processing result to the client object. This type of message passing can be handled in a manner similar to the concept of the function calling illustrated in FIG. 1, based on the fact that the processing request is received and the processing result is returned by the same object. Even if there are a plurality of server objects, the above message passing can be handled in a manner similar to the concept of the function calling if a server object that receives the processing request is the same as a server object that returns the processing result.
However, if there are a plurality of server objects, and a server object that receives the processing request is different from a server object that returns the processing result, the aforementioned message passing cannot be handled in a manner similar to that of the function calling. Accordingly, it becomes necessary, for example, that the client object takes into account that the processing request is received and the processing result is returned by different server objects. However, such a requirement for the client server becomes a heavy burden on programming.
Accordingly, in view of the above background of the conventional art, it is an object of the present invention to provide a data processing method in which even if there are a plurality of server objects, and even if a server, object that receives a processing request is different a server object that returns a processing result, message passing can be performed between the client object and the server object while eliminating the need for the client object to take into account that the processing request is received and the processing result is returned by the different server objects.
It is another object of the present invention to provide a recording medium on which an operating system implementing the above-described data processing method is recorded, and to provide a data processing apparatus provided with such a recording medium.
In order to achieve the above objects, according to one aspect of the present invention, there is provided a data processing method in which a message is sent from a client object to a server object having two or more objects, and the server object excutes processing in response to a request by the message and returns a result of the processing to the client object. In the aforementioned data processing method, upon sending the message from the client object to the server object, a data area for storing the result of the processing executed by the server object is reserved. When the processing is executed by the server object in response to the request by the message, an authorization to return the result of the processing executed by the server object to the client object is delegated between the objects of the server object. The result of the processing executed by the object which was most recently delegated to possess the authorization is stored in the data area. The result of the processing executed by the server object is received by the client object by reading the data stored in the data area.
With this arrangement, an authorization to return to the client object the result of the processing executed by the server object is delegated between the objects of the server object, and the processing result of the object which was most recently delegated to possess the authorization is stored in the data area. Thus, even if a processing request is received and a processing result is returned by different objects, the result of the processing executed by the server object can be correctly delivered to the client object via the above-described data area.
According to another aspect of the present invention, there is provided a recording medium on which an operating system is recorded. The operating system has message-sending means for sending a message from a client object to a server object, and authorization-delegating means for delegating an authorization between objects, both means being used as application program interfaces for describing objects. The above-described operating system sends a message from the client object to the server object upon being requested to execute the message-sending means, and also reserves a data area for storing a result of processing executed by the server object. The operating system delegates an authorization to return the result of the processing executed by the server object to the client object from one object of the server object to another object of the server object upon being requested to execute the authorization-delegating means. The operating system stores the result of the processing executed by an object which was most recently delegated to possess the authorization by the authorization-delegating method, upon completing the processing by the server object in response to the message sent to the server object by the message-sending means.
With the above arrangement, upon completing the processing by the server object in response to the message sent to the server object by the message-sending means, the operating system recorded on the recording medium stores in the data area the result of the processing executed by the object which was most recently delegated to possess the above authorization by the authorization-delegating means. Simultaneously, the client object is able to receive the processing result of the server object by reading the data stored in the data area, regardless of whether an authorization is delegated within the server object. Hence, by using the aforementioned operating system, it is possible to correctly deliver the processing result of the server object to the client object via the data area even if a processing request is received and a processing result is returned by different objects of the server object.
According to a further aspect of the present invention, there is provided a data processing apparatus comprising a recording medium on which an operating system is recorded. The operating system has message-sending means for sending a message from a client object to a server object, and authorization-delegating means for delegating an authorization between objects, both means being used as application program interfaces for describing objects. The operating system sends a message from the client object to the server object upon being requested to execute the message-sending means, and also reserves a data area for storing a result of processing executed by the server object. The operating system delegates an authorization to return the result of the processing executed upon the server object to the client object from one object of the server object to another object of the server object by being requested to execute the authorization-delegating means. The operating system stores the result of the processing executed by an object which was most recently delegated to possess the authorization by the authorization-delegating means, upon completing the processing by the server object in response to the message sent to the server object by the message-sending means.
With this arrangement, upon completing the processing by the server object in response to the message sent to the server object by the above-described message-sending means, the operating system recorded on the recording medium provided for the aforementioned data processing apparatus stores in the data area the result of the processing executed by the object which was most recently delegated to possess the above authorization by the authorization-delegating means. Simultaneously, the client object is able to receive the processing result of the server object by reading the data stored in the data area, regardless of whether an authorization is delegated within the server object. Hence, by using the aforementioned operating system, it is possible to correctly deliver the processing result of the server object to the client object via the data area even if a processing request is received and a processing result is returned by different objects of the server object.
In this specification, software for managing the execution of application programs is referred to as xe2x80x9can operating systemxe2x80x9d in a broad sense. That is, the operating system described in this specification includes not only basic software for managing hardware, but also, software operating on basic software for managing hardware and managing the execution of application programs, which is referred to as, xe2x80x9cmiddlewarexe2x80x9d. Further, the operating system described in this specification includes software implementing a virtual computer system, in which a plurality of program execution environments are implemented by a single computer, and it appears to the user that a plurality of computers are operating.